package com.noahplat.oauth.utils;


import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * 作者：李景星
 * 描述：userjwt中间类，用于返回用户详情，校验用户信息
 * 时间：2020-11-03
 */
public class UserJwt extends User {
    private Long id;    //用户ID
    private String name;  //用户名字
    private Long pid; //用于app端登陆时获取pid
    private String userType;    //登录方式： 0-PC,1-APP，2-pc&app
    private String stid;      //系统标识，用于区分是哪个系统
    private Long acctid;    //账套id

    //重写构造
    public UserJwt(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getStid() {
        return stid;
    }

    public void setStid(String stid) {
        this.stid = stid;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public Long getAcctid() {
        return acctid;
    }

    public void setAcctid(Long acctid) {
        this.acctid = acctid;
    }
}
